package com.shop.common.model;

import java.util.Map;

public class InputBean<P> {
    private P param;

    private Integer index;

    private Integer pageSize;

    private Map<String,Object> params;

    private String token;

    private Integer userId;

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public InputBean(P param) {
        this.param = param;
    }

    public InputBean(P param, Integer index, Integer pageSize) {
        this.param = param;
        this.index=index;
        this.pageSize=pageSize;
    }

    public InputBean() {
    }


    public InputBean(Map<String, Object> params) {
        this.params = params;
    }

    public Map<String, Object> getParams() {
        return params;
    }

    public void setParams(Map<String, Object> params) {
        this.params = params;
    }

    public P getParam() {
        return param;
    }

    public void setParam(P param) {
        this.param = param;
    }

    public Integer getIndex() {
        return index;
    }

    public void setIndex(Integer index) {
        this.index = index;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public Object getParam(String name){
        return params.get(name);
    }

    public void putParam(String key,Object value){
        params.put(key,value);
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getUserId() {
        return userId;
    }
}
